The most recent virus outbreaks have caused unexpected changes in people\'s lives, resulting in a pandemic that primarily affected our entire civilization. We are still not completely recovered from the coronavirus (covid-19) pandemic, and a new virus known as Monkeypox, which is transmitted by skin-to-skin contact and direct contact, for which there is currently no immunization available for complete cure the only way to prevent is this to follow safety measures such as social distancing in public areas. The proposed system is based on Artificial intelligence, which uses a deep convolutional neural network to track and identify people violating social distancing with the help of YOLOv3 algorithms to measure the distance between them and make them aware in real-time.
Introduction
I. INTRODUCTION
The ongoing virus outbreaks are causing global disasters in all aspects of life. Although the coronavirus has not completely gone. Many new outbreaks of infectious viruses are occurring [1] such as Monkeypox a zoonotic virus (a virus transmitted to humans from animals). Close contact with an infected person or substance contagious with the virus transmits the infection to people. When a person is infected with Monkeypox the virus can last up to 2- 4 weeks. As we know that there is no proper immunization available for these new virus outbreaks the only prevention [2], is to practice social distancing in public or crowded areas. This main concept is to understand how technology is useful for detecting the social- distance between people. In this approach, we track and identify public violating social distancing with the help of yolov3 a deep learning detection technique that assigns a bounding box to each person in the image and calculates the violation distance, and gives an alert in real-time.[3] This technique is developed to detect social distance violations in indoor and outdoor scenarios such as hospitals, offices, metro stations, and many other places.[4]
II. PROBLEM STATEMENT
The main problem is keeping a distance from others in public areas such as Hospitals, offices, public transportations, markets, Religion places, Malls and other various places. Plenty of people violate social distance in public places or locations where the virus's transmission rate is high because many new variations of virus and mutations attack differently.As there is no proper vaccine or medicine available for new viruses. So, one of the best preventions is to maintain social distancing in public areas so transmission of new infections can be avoided.
III. SOFTWARE REQUIREMENTS
Python (versions above 3.7): It’s a general-purpose, high-level programming language. It is compatible with a variety of programming paradigms, including structured, object-oriented, and functional programming.
PyCharm Software (version 2021.1): It is an integrated development environment for computer programming, with a focus on the Python programming language. JetBrains, a Czech company, developed it.
Jupyter Notebook: It's a free and open-source web tool for creating and sharing files that include live code, mathematics, images, and explanatory text. Data filtration and modification, numerical simulation, statistical modeling, machine learning, and a plethora of other applications are all available.
Anaconda IDE: An open-source, IDE with strong cross-language connectivity that enables you to create and share documents with live code, equations, visuals, and narrative content.
PyCharm: It’s an IDE which is used in programming. It is created by JetBrains, a Czech firm. With versions for Windows, macOS, and Linux, PyCharm is cross-platform.
A. Libraries
OpenCV: Is a free computer vision and machine learning software library. OpenCV was developed to offer a standard infrastructure for computer vision applications.
SciPy: An BSD-licensed scientific libraries for Python. NumPy, a Python library for manipulating N-dimensional arrays, is required by the SciPy library. The SciPy library was created to work with NumPy arrays.
NumPy: Python library used for computing with arrays. It also provides functionalities for working with linear algebra, Fourier transforms, and matrices.
Imutils: A collection of functions which make essential image processing operations for instances interpretation, rotation, scaling, skeletonization, and displaying Matplotlib images easy using OpenCV.
Datetime: The DateTime module in Python allows you to work with real dates and times. We must work with the date and time in real-world applications.
OS Module: The Python OS module allows the user and the operating system to communicate with one another. It includes several useful OS functions for executing OS-related operations and collecting operating system information.
SMTP Library: Sending email to any Internet device equipped with SMTP is possible thanks to the SMTP library module, which specifies an SMTP client session object.
IV. PROPOSED SYSTEM
We'll be utilizing YOLOv3 for people detection to identify individuals in the photos or streaming video. As we've RNN, Fast-CNN architecture for human detection and object detection, except for real-time scenario YOLOv3 is super-fast and runs real-time with high accuracy [5]. It approaches detecting objects as a regression problem, acquiring bounding box coordinates and the matching target class possible result from a given input picture. It is used to revert the person prediction probability and provide bounding boxes for each person, and coordinates., and therefore physical distance is calculated using Euclidean distance which uses a centroid as a person (i.e., first bounding box) to measure the physical distance between other persons (i.e., other bounding boxes).[6]
Based on the threshold value limit, the violation alert is generated. A violation alarm is set if the bounding boxes change their color from green to red (i.e., It indicates a serious social distance violation has occurred) and if the bounding boxes change their color from green to yellow (i.e., It indicates an Abnormal social distance violation has occurred) and if the bounding boxes do not change its color from green (i.e., It indicates No social distance violation). Also, if the entire violation count exceeds the threshold limit (i.e., it sends an E-mail aware of high authorities or whoever monitors the place). We have divided the whole system into different modules such as the video stream capturing module, Distance Measuring module, Distance violation detection module, and Alert system module.
V. MODULES
A. Video capturing Module
In this video capturing module the input from the video stream with 48 frames per second(fps). Here, the Computer Vision library (OpenCV) is used for image processing to identify the people in the frame and give each person a bounding box using yolov3 weights predefined in the program.
B. Distance Detection Module
In this module by taking the input from the video stream 48 frames per second(fps) Computer Vision library (OpenCV) is used for image processing, video capture, and analysis. This module is used to calculate the frames per second.
The formula for calculating fps value is
fps = 1 / (cTime - pTime)
C. Violation Module
After calculation of the Euclidean distance between them, the violation is set as threshold distance. Then serious violation is detected if threshold limit < 80px. Abnormal violation is detected if threshold limit >=80px. No violation is detected if threshold limit >>80px.
???????D. Alert System Module
This module sends an alert message to an E-Mail to any given address. You can store and edit information about alerts for users identified by an external id in the Alerts module. These operations can be carried out with the help of an OSGI service or by triggering events. The method you choose is entirely up to you and your execution.
VI. STEPS
Step 1: Import an input image or video stream.
Step 2: Convert the image or video stream into frames. (48 frames/sec).
Step 3: Now, assign the value coordinates according to the pixel’s value.
Step 4: Then objects are identified with help of YOLOv3 algorithms.
Step 5: Now, it uses a single-layer convolution technique for classifying the objects in the frame.
Step 6: Filter out the unwanted objects in the image rather than people in the frame using the AI algorithm.
Step 7: Sets the bounding boxes for the object in the frame. (Rectangle frame on the object)
Step 8: It assigns the values of coordinates and dimensions to the bounding boxes
Step 9: Now, the bounding boxes move according to movement in the video frame and capture their distances between other people using a distance detection algorithm.
Step 10: According to the distance value the bounding box’s color change is determined.
Step 11: If the distance between the objects exceeds the threshold value, Then the violation occurs.
12. Step 12: If else conditions are used when the is no violation.
VIII. FUTURE SCOPE
We will continue our research to include and experiment with people detection by using three parameters (x, y, z) to detect uniformly distributed distance in the entire image and eliminate the angle effect. For image detection, the social distancing indicator currently requires manual calibration. Using AR (Augmented Reality) libraries from OpenCV would be a more innovative approach and further, we can also implement this technology in drones which would be more accurate and have higher surveillance.
Conclusion
Social distance is one of the most essential measures to take in order to prevent physical contact that can promote the transmission of contagious diseases. Non-compliance with these guidelines will result in an increase in viral transmission rates. Using Python and the OpenCV framework, a system is designed to achieve two required functions that are quality and accuracy. On the basis of the overall findings, it appears that this study has achieved all of its goals. However, the results have some restrictions.
According to the findings of the system\'s test, the object detection model utilized for detecting individuals has difficulties correctly recognizing individuals in the outside environment and difficulties recognizing people in the indoor environment. Additionally, a centroid tracking method is employed to keep an eye on the people that are present. According to experimental data, the framework successfully detects individuals who are walking too closely to one another and are breaching social distancing. Furthermore, the learning approach enhances the detection model\'s overall effectiveness and accuracy.
The model\'s tracking accuracy is 95%. The work might be enhanced in the future to accommodate various indoor and outdoor environments. There are a number of detection and tracking techniques that may be applied to identify the individual persons who are over the social distance threshold. The proposed methodology could be applied to a distributed video surveillance system, and it is a good technique for the government to see how well individuals are adhering to social distance. It gives authorities a decent way to monitor how citizens are following to social distance.
References
[1] QI XU. 2022. Spectrum Analysis of Contact Network for Public Policy in a Pandemic, vol 10-IEEE systems, man and cybernetics society section
[2] Ferguson, N. M. et al. “Strategies for mitigating an influenza pandemic”. Nature 442, 448–452, DOI: “HTTPS: //doi.org/10.1038/nature04795 (2006)”.
[3] Togaçar, M., Ergen, B. & Cömert, Z. “COVID-19 detection using deep learning models to exploit social mimic optimization and structured chest X-ray images using fuzzy color and stacking approaches”. Compute. Biol. Medicine 103805, DOI: “https://doi.org/10.1016/j”. compbiomed.2020.103805 (2020). 13. Ulhaq, A., Khan, A., Gomes, D. & Paul, M. Computer vision for COVID-19 control: A survey. Image Video Process. DOI: 10.31224/osf.io/yt9sx (2020).
[4] Morato, M. M., Bastos, S. B., Cajueiro, D. O. & NormeyRico, J. E. “An optimal predictive control strategy for COVID-19 (SARS-CoV-2)” social distancing policies in Brazil. Elsevier Annu. Rev. Control. DOI: https://doi.org/10.1016/j.arcontrol.2020.07.001 (2020)
[5] RedmonJ., Farhadi A.2018.YOLOv3: “An incremental improvement of the image detection” arXiv:1804.02767.
[6] Ren S., He K., Girshick R., Sun J. “Advances in neural information processing systems”. 2015. pp. 91–99.